package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.redepronik.negosys.rrhh.entity.Cliente;

/**
 * The persistent class for the garante database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "garante")
@NamedQuery(name = "Garante.findAll", query = "SELECT g FROM Garante g")
public class Garante implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "GARANTE_GARANTEID_GENERATOR", sequenceName = "INVFAC.GARANTE_GARANTEID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GARANTE_GARANTEID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer garanteid;

	// bi-directional many-to-one association to empleadoCargo
	@ManyToOne
	@JoinColumn(name = "clienteid", nullable = false)
	private Cliente cliente;

	// bi-directional many-to-one association to Credito
	@ManyToOne
	@JoinColumn(name = "creditoid", nullable = false)
	private Credito credito;

	public Garante() {
	}

	public Cliente getCliente() {
		return cliente;
	}

	public Credito getCredito() {
		return this.credito;
	}

	public Integer getGaranteid() {
		return this.garanteid;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	public void setCredito(Credito credito) {
		this.credito = credito;
	}

	public void setGaranteid(Integer garanteid) {
		this.garanteid = garanteid;
	}

}